export default class score_show extends Laya.Script {

    constructor() { 
        super(); 
        this.time_line = null;
    }
    
    onEnable() {
    }

    onDisable() {
    }

    show_score(is_dec){
      //  console.log(is_dec);
        if(is_dec){
            this.owner.skin = "res/score_1.png";
        }
        else{
            this.owner.skin = "res/score_2.png";
        }
        this.time_line = Laya.TimeLine.to(this.owner,{y:this.owner.y-80},500,Laya.Ease.backOut,500);
        this.time_line.to(this.owner,{alpha:0},500,null,300);
        this.time_line.play(0,false);
        this.time_line.on(Laya.Event.COMPLETE,this,function(){
            this.owner.removeSelf();
        });
    }

    onStart(){
        //this.show_score(true);
    }
}